import React, { Component } from 'react';
import {
  Button,
  Modal,
  Select,
  Form,
  Row,
  Col,
  Input,
  Radio,
  Table,
  DatePicker,
  message,
} from 'antd';
import { connect } from 'dva';
import BaseComponent from '@/components/BaseComponent';
import moment from 'moment';

@connect(({ user }) => ({
  currentUser: user.currentUser,
}))
@Form.create()
export default class index extends BaseComponent {
  state = {
    visible: false,
    form: {},
    personalData: [],
    isHjData: [],
    dyeData: [],
    sgblCodeData: [],
    bmblCodeData: [],
    wblCodeData: [],
    sezcCodeData: [],
    zlFsData: [],
  };
  showModal = () => {
    this.findById();
    this.findAllDictName();
    this.getUserByOrgId();
    this.setState({
      visible: true,
    });
  };

  handleOk = () => {
    this.props.form.validateFields((errors, values) => {
      if (!errors) {
        this.setState(
          params => ({
            form: {
              ...params.form,
              id: this.props.record.id,
            },
          }),
          () => {
            this.update(this.state.form);
            this.setState({
              visible: false,
            });
          }
        );
      } else {
        // console.log(errors);
        this.errorMessage('请将表单补充完成');
      }
    });
  };

  handleCancel = () => {
    this.setState({
      visible: false,
    });
  };

  /**详情*/
  findById = () => {
    this.execHttp('treatmentList/findById', {
      id: this.props.record.id,
    }).then(resp => {
      if (resp && resp.success) {
        this.setState({
          form: resp.data.response,
        });
      }
    });
  };

  //字典
  findAllDictName = () => {
    this.execHttp('treatmentList/findAllDictName').then(resp => {
      if (resp && resp.success) {
        const isHjData = resp.data.is_hj.map(({ dictValue, dictName }) => {
          return { value: dictValue, label: dictName };
        });
        const zlFsData = resp.data.zlfs.map(({ dictValue, dictName }) => {
          return { value: dictValue, label: dictName };
        });
        this.setState({
          isHjData: isHjData,
          dyeData: resp.data.dye,
          sgblCodeData: resp.data.sgbl_code,
          bmblCodeData: resp.data.bmbl_code,
          wblCodeData: resp.data.wbl_code,
          sezcCodeData: resp.data.sezc_code,
          zlFsData: zlFsData,
        });
      }
    });
  };

  //当前机构下的人
  getUserByOrgId = () => {
    this.execHttp('treatmentList/getUserByOrgId', {
      id: this.props.record.orgId,
      currentPage: 1,
      pageSize: 9999,
    }).then(resp => {
      if (resp && resp.success) {
        this.setState({
          personalData: resp.data.list,
        });
      }
    });
  };

  //编辑保存
  update = from => {
    this.execHttp('treatmentList/update', {
      ...from,
    }).then(resp => {
      if (resp && resp.success) {
        message.success(resp.message);
        this.props.getDataByPage({});
      }
    });
  };

  contactsChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        contacts: value,
      },
    }));
  };

  relationshipChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        relationship: value,
      },
    }));
  };

  telephoneChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        telephone: value,
      },
    }));
  };

  isOurDiagnosisChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        isOurDiagnosis: value,
      },
    }));
  };

  njjcChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        njjc: value,
      },
    }));
  };

  dyeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        dye: value,
      },
    }));
  };

  isHjChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        isHj: value,
      },
    }));
  };

  sgblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        sgblCode: value,
      },
    }));
  };

  sgblCodeViewChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        sgblCodeView: value,
      },
    }));
  };

  bmblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        bmblCode: value,
      },
    }));
  };

  bmblCodeViewChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        bmblCodeView: value,
      },
    }));
  };
  wblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        wblCode: value,
      },
    }));
  };
  wblCodeViewChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        wblCodeView: value,
      },
    }));
  };
  sezcCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        sezcCode: value,
      },
    }));
  };

  sezcCodeViewChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        sezcCodeView: value,
      },
    }));
  };

  blzdUnitChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        blzdUnit: value,
      },
    }));
  };
  blzdStaffChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        blzdStaff: value,
      },
    }));
  };

  blzdTimeChange = (date, dateString) => {
    console.log(date, dateString);
    this.setState(params => ({
      form: {
        ...params.form,
        blzdTime: dateString,
      },
    }));
  };
  blshViewChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        blshView: value,
      },
    }));
  };

  blshStaffChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        blshStaff: value,
      },
    }));
  };
  blshTimeChange = (date, dateString) => {
    console.log(date, dateString);
    this.setState(params => ({
      form: {
        ...params.form,
        blshTime: dateString,
      },
    }));
  };

  isZlChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        isZl: value,
      },
    }));
  };
  zlFsChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        zlFs: value,
      },
    }));
  };

  isOurZlChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        isOurZl: value,
      },
    }));
  };

  zlUnitChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        zlUnit: value,
      },
    }));
  };
  zlDateChange = (date, dateString) => {
    console.log(date, dateString);
    this.setState(params => ({
      form: {
        ...params.form,
        zlDate: dateString,
      },
    }));
  };

  commanderChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        commander: value,
      },
    }));
  };

  complicationChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        complication: value,
      },
    }));
  };

  processingMethodChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        processingMethod: value,
      },
    }));
  };
  processingResultChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        processingResult: value,
      },
    }));
  };
  shSgblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCode: value,
      },
    }));
  };

  shSgblCodeBlfhcdChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCodeBlfhcd: value,
      },
    }));
  };
  shSgblCodeTnmTChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCodeTnmT: value,
      },
    }));
  };
  shSgblCodeTnmNChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCodeTnmN: value,
      },
    }));
  };
  shSgblCodeTnmMChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCodeTnmM: value,
      },
    }));
  };

  shSgblCodeLcfqChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSgblCodeLcfq: value,
      },
    }));
  };

  shBmblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCode: value,
      },
    }));
  };

  shBmblCodeBlfhcdChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCodeBlfhcd: value,
      },
    }));
  };

  shBmblCodeTnmTChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCodeTnmT: value,
      },
    }));
  };

  shBmblCodeTnmNChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCodeTnmN: value,
      },
    }));
  };

  shBmblCodeTnmMChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCodeTnmM: value,
      },
    }));
  };
  shBmblCodeLcfqChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shBmblCodeLcfq: value,
      },
    }));
  };
  shWblCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCode: value,
      },
    }));
  };

  shWblCodeBlfhcdChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCodeBlfhcd: value,
      },
    }));
  };

  shWblCodeTnmTChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCodeTnmT: value,
      },
    }));
  };

  shWblCodeTnmNChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCodeTnmN: value,
      },
    }));
  };

  shWblCodeTnmMChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCodeTnmM: value,
      },
    }));
  };
  shWblCodeLcfqChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shWblCodeLcfq: value,
      },
    }));
  };
  shSezcCodeChange = value => {
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCode: value,
      },
    }));
  };

  shSezcCodeBlfhcdChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCodeBlfhcd: value,
      },
    }));
  };

  shSezcCodeTnmTChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCodeTnmT: value,
      },
    }));
  };

  shSezcCodeTnmNChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCodeTnmN: value,
      },
    }));
  };

  shSezcCodeTnmMChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCodeTnmM: value,
      },
    }));
  };
  shSezcCodeLcfqChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        shSezcCodeLcfq: value,
      },
    }));
  };

  caseFileDuplicateChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        caseFileDuplicate: value,
      },
    }));
  };

  recorderChange = e => {
    const value = e.target.value;
    this.setState(params => ({
      form: {
        ...params.form,
        recorder: value,
      },
    }));
  };

  recordDateChange = (date, dateString) => {
    console.log(date, dateString);
    this.setState(params => ({
      form: {
        ...params.form,
        recordDate: dateString,
      },
    }));
  };

  render() {
    const { visible } = this.state;
    const { getFieldDecorator } = this.props.form;
    const formItemLayout = {
      // labelCol: {
      //     xs: { span: 24 },
      //     sm: { span: 10 },
      // },
    };

    return (
      <div>
        <Button type="primary" onClick={this.showModal}>
          修改
        </Button>
        <Modal
          title="修改"
          visible={visible}
          onOk={this.handleOk}
          onCancel={this.handleCancel}
          width={1000}
        >
          <h3>基本信息</h3>
          <Form {...formItemLayout}>
            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="姓名">
                  <Input
                    placeholder="姓名"
                    disabled
                    value={this.props.record.name}
                    style={{ width: 200 }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="身份证">
                  <Input
                    placeholder="身份证"
                    disabled
                    value={this.props.record.idCard}
                    style={{ width: 200 }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="调查对象ID号">
                  <Input
                    placeholder="调查对象ID号"
                    disabled
                    value={this.props.record.screeningId}
                    style={{ width: 200 }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="家庭地址">
                  <Input
                    placeholder="家庭地址"
                    disabled
                    value={this.props.record.addr}
                    style={{ width: 200 }}
                  />
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="联系人">
                  {getFieldDecorator('contacts', {
                    initialValue: this.state.form.contacts,
                    rules: [{ required: true, message: '联系人必填' }],
                  })(
                    <Input
                      placeholder="联系人"
                      onChange={this.contactsChange}
                      style={{ width: '200px' }}
                    />
                  )}
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="关系">
                  {getFieldDecorator('relationship', {
                    initialValue: this.state.form.relationship,
                    rules: [{ required: true, message: '关系必填' }],
                  })(
                    <Input
                      placeholder="关系"
                      onChange={this.relationshipChange}
                      style={{ width: '200px' }}
                    />
                  )}
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="联系电话">
                  {getFieldDecorator('telephone', {
                    initialValue: this.state.form.telephone,
                    rules: [
                      { required: true, message: '联系电话必填' },
                      { pattern: /^1\d{10}$/, message: '请正确填写联系电话信息' },
                    ],
                  })(
                    <Input
                      placeholder="联系电话"
                      onChange={this.telephoneChange}
                      value={this.state.form.telephone}
                      style={{ width: '200px' }}
                    />
                  )}
                </Form.Item>
              </Col>
            </Row>

            <h3>诊断信息</h3>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="是否本院诊断">
                  <Radio.Group
                    onChange={this.isOurDiagnosisChange}
                    value={this.state.form.isOurDiagnosis}
                  >
                    <Radio value={'1'}>是</Radio>
                    <Radio value={'2'}>否</Radio>
                  </Radio.Group>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="内镜检查">
                  {getFieldDecorator('njjc', {
                    initialValue: this.state.form.njjc,
                    rules: [{ required: true, message: '内镜检查必填' }],
                  })(
                    <Radio.Group onChange={this.njjcChange} value={this.state.form.njjc}>
                      <Radio value={'1'}>是</Radio>
                      <Radio value={'2'}>否</Radio>
                    </Radio.Group>
                  )}
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="染色类型">
                  <Select
                    allowClear
                    value={this.state.form.dye}
                    onChange={this.dyeChange}
                    style={{ width: 200 }}
                    placeholder="请选择食管最高病理诊断代码"
                  >
                    {this.state.dyeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="是否活检">
                  <Radio.Group
                    options={this.state.isHjData}
                    onChange={this.isHjChange}
                    value={this.state.form.isHj}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="食管最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.sgblCode}
                    onChange={this.sgblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择食管最高病理诊断代码"
                  >
                    {this.state.sgblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理意见">
                  <Input
                    placeholder="处理意见"
                    onChange={this.sgblCodeViewChange}
                    value={this.state.form.sgblCodeView}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="贲门最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.bmblCode}
                    onChange={this.bmblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择贲门最高病理诊断代码"
                  >
                    {this.state.bmblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理意见">
                  <Input
                    placeholder="处理意见"
                    onChange={this.bmblCodeViewChange}
                    value={this.state.form.bmblCodeView}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>
            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="胃最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.wblCode}
                    onChange={this.wblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择胃最高病理诊断代码"
                  >
                    {this.state.wblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理意见">
                  <Input
                    placeholder="处理意见"
                    onChange={this.wblCodeViewChange}
                    value={this.state.form.wblCodeView}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="十二指肠最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.sezcCode}
                    onChange={this.sezcCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择十二指肠最高病理诊断代码"
                  >
                    {this.state.sezcCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理意见">
                  <Input
                    placeholder="处理意见"
                    onChange={this.sezcCodeViewChange}
                    value={this.state.form.sezcCodeView}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="诊断单位">
                  <Input
                    placeholder="诊断单位"
                    value={this.state.form.blzdUnit}
                    onChange={this.blzdUnitChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="诊断医师">
                  <Select
                    allowClear
                    value={this.state.form.blzdStaff}
                    onChange={this.blzdStaffChange}
                    style={{ width: 200 }}
                    placeholder="请选择诊断医师"
                  >
                    {this.state.personalData.map(item => (
                      <Select.Option key={item.id}>{item.nickname}</Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="诊断时间">
                  <DatePicker
                    style={{ width: 200 }}
                    showTime
                    format="YYYY-MM-DD "
                    value={
                      this.state.form.blzdTime === null
                        ? this.state.form.blzdTime
                        : moment(this.state.form.blzdTime, 'YYYY-MM-DD ')
                    }
                    onChange={this.blzdTimeChange}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="临床处理意见">
                  <Input
                    placeholder="临床处理意见"
                    value={this.state.form.blshView}
                    onChange={this.blshViewChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床医师">
                  <Select
                    allowClear
                    value={this.state.form.blshStaff}
                    onChange={this.blshStaffChange}
                    style={{ width: 200 }}
                    placeholder="请选择临床医师"
                  >
                    {this.state.personalData.map(item => (
                      <Select.Option key={item.id}>{item.nickname}</Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床时间">
                  <DatePicker
                    style={{ width: 200 }}
                    showTime
                    format="YYYY-MM-DD "
                    value={
                      this.state.form.blshTime === null
                        ? this.state.form.blshTime
                        : moment(this.state.form.blshTime, 'YYYY-MM-DD ')
                    }
                    onChange={this.blshTimeChange}
                  />
                </Form.Item>
              </Col>
            </Row>

            <h3>治疗信息</h3>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="是否治疗">
                  <Radio.Group value={this.state.form.isZl} onChange={this.isZlChange}>
                    <Radio value={'1'}>是</Radio>
                    <Radio value={'2'}>否</Radio>
                  </Radio.Group>
                </Form.Item>
              </Col>
              <Col span={18}>
                <Form.Item label="治疗方式">
                  <Radio.Group
                    value={this.state.form.zlFs}
                    options={this.state.zlFsData}
                    onChange={this.zlFsChange}
                    style={{ width: 750 }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="是否本院治疗">
                  <Radio.Group value={this.state.form.isOurZl} onChange={this.isOurZlChange}>
                    <Radio value={'1'}>是</Radio>
                    <Radio value={'2'}>否</Radio>
                  </Radio.Group>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="治疗单位">
                  <Input
                    placeholder="治疗单位"
                    value={this.state.form.zlUnit}
                    onChange={this.zlUnitChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="治疗日期">
                  <DatePicker
                    style={{ width: 200 }}
                    showTime
                    format="YYYY-MM-DD "
                    value={
                      this.state.form.zlDate === null
                        ? this.state.form.zlDate
                        : moment(this.state.form.zlDate, 'YYYY-MM-DD ')
                    }
                    onChange={this.zlDateChange}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="负责人">
                  <Select
                    allowClear
                    value={this.state.form.commander}
                    onChange={this.commanderChange}
                    style={{ width: 200 }}
                    placeholder="请选择负责人"
                  >
                    {this.state.personalData.map(item => (
                      <Select.Option key={item.id}>{item.nickname}</Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="并发症">
                  <Radio.Group
                    value={this.state.form.complication}
                    onChange={this.complicationChange}
                  >
                    <Radio value={'1'}>有</Radio>
                    <Radio value={'2'}>无</Radio>
                  </Radio.Group>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理方法">
                  <Input
                    placeholder="处理方法"
                    value={this.state.form.processingMethod}
                    onChange={this.processingMethodChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="处理结果">
                  <Input
                    placeholder="处理结果"
                    value={this.state.form.processingResult}
                    onChange={this.processingResultChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="术后食管最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.shSgblCode}
                    onChange={this.shSgblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择食管最高病理诊断代码"
                  >
                    {this.state.sgblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="病理分化程度">
                  <Input
                    placeholder="病理分化程度"
                    value={this.state.form.shSgblCodeBlfhcd}
                    onChange={this.shSgblCodeBlfhcdChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="TNM分期">
                  T:
                  <Input
                    placeholder="t"
                    value={this.state.form.shSgblCodeTnmT}
                    onChange={this.shSgblCodeTnmTChange}
                    style={{ width: '50px' }}
                  />
                  N:
                  <Input
                    placeholder="n"
                    value={this.state.form.shSgblCodeTnmN}
                    onChange={this.shSgblCodeTnmNChange}
                    style={{ width: '50px' }}
                  />
                  M:
                  <Input
                    placeholder="m"
                    value={this.state.form.shSgblCodeTnmM}
                    onChange={this.shSgblCodeTnmMChange}
                    style={{ width: '50px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床分期">
                  <Input
                    placeholder="临床分期"
                    value={this.state.form.shSgblCodeLcfq}
                    onChange={this.shSgblCodeLcfqChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="术后贲门最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.shBmblCode}
                    onChange={this.shBmblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择贲门最高病理诊断代码"
                  >
                    {this.state.bmblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="病理分化程度">
                  <Input
                    placeholder="病理分化程度"
                    value={this.state.form.shBmblCodeBlfhcd}
                    onChange={this.shBmblCodeBlfhcdChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="TNM分期">
                  T:
                  <Input
                    placeholder="t"
                    value={this.state.form.shBmblCodeTnmT}
                    onChange={this.shBmblCodeTnmTChange}
                    style={{ width: '50px' }}
                  />
                  N:
                  <Input
                    placeholder="n"
                    value={this.state.form.shBmblCodeTnmN}
                    onChange={this.shBmblCodeTnmNChange}
                    style={{ width: '50px' }}
                  />
                  M:
                  <Input
                    placeholder="m"
                    value={this.state.form.shBmblCodeTnmM}
                    onChange={this.shBmblCodeTnmMChange}
                    style={{ width: '50px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床分期">
                  <Input
                    placeholder="临床分期"
                    value={this.state.form.shBmblCodeLcfq}
                    onChange={this.shBmblCodeLcfqChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="术后胃最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.shWblCode}
                    onChange={this.shWblCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择胃最高病理诊断代码"
                  >
                    {this.state.wblCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="病理分化程度">
                  <Input
                    placeholder="病理分化程度"
                    value={this.state.form.shWblCodeBlfhcd}
                    onChange={this.shWblCodeBlfhcdChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="TNM分期">
                  T:
                  <Input
                    placeholder="t"
                    value={this.state.form.shWblCodeTnmT}
                    onChange={this.shWblCodeTnmTChange}
                    style={{ width: '50px' }}
                  />
                  N:
                  <Input
                    placeholder="n"
                    value={this.state.form.shWblCodeTnmN}
                    onChange={this.shWblCodeTnmNChange}
                    style={{ width: '50px' }}
                  />
                  M:
                  <Input
                    placeholder="m"
                    value={this.state.form.shWblCodeTnmM}
                    onChange={this.shWblCodeTnmMChange}
                    style={{ width: '50px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床分期">
                  <Input
                    placeholder="临床分期"
                    value={this.state.form.shWblCodeLcfq}
                    onChange={this.shWblCodeLcfqChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="术后十二指肠最高病理诊断代码">
                  <Select
                    allowClear
                    value={this.state.form.shSezcCode}
                    onChange={this.shSezcCodeChange}
                    style={{ width: 200 }}
                    placeholder="请选择十二指肠最高病理诊断代码"
                  >
                    {this.state.sezcCodeData.map(item => (
                      <Select.Option key={item.dictValue}>
                        {'(' + item.dictValue + ')' + item.dictName}
                      </Select.Option>
                    ))}
                  </Select>
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="病理分化程度">
                  <Input
                    placeholder="病理分化程度"
                    value={this.state.form.shSezcCodeBlfhcd}
                    onChange={this.shSezcCodeBlfhcdChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="TNM分期">
                  T:
                  <Input
                    placeholder="t"
                    value={this.state.form.shSezcCodeTnmT}
                    onChange={this.shSezcCodeTnmTChange}
                    style={{ width: '50px' }}
                  />
                  N:
                  <Input
                    placeholder="n"
                    value={this.state.form.shSezcCodeTnmN}
                    onChange={this.shSezcCodeTnmNChange}
                    style={{ width: '50px' }}
                  />
                  M:
                  <Input
                    placeholder="m"
                    value={this.state.form.shSezcCodeTnmM}
                    onChange={this.shSezcCodeTnmMChange}
                    style={{ width: '50px' }}
                  />
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="临床分期">
                  <Input
                    placeholder="临床分期"
                    value={this.state.form.shSezcCodeLcfq}
                    onChange={this.shSezcCodeLcfqChange}
                    style={{ width: '200px' }}
                  />
                </Form.Item>
              </Col>
            </Row>

            <Row gutter={16}>
              <Col span={6}>
                <Form.Item label="临床病例资料复印">
                  {getFieldDecorator('caseFileDuplicate', {
                    initialValue: this.state.form.caseFileDuplicate,
                    rules: [{ required: true, message: '内镜检查信息必选' }],
                  })(
                    <Radio.Group onChange={this.caseFileDuplicateChange}>
                      <Radio value={'1'}>是</Radio>
                      <Radio value={'2'}>否</Radio>
                    </Radio.Group>
                  )}
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="记录人">
                  {getFieldDecorator('recorder', {
                    initialValue: this.state.form.recorder,
                    rules: [{ required: true, message: '记录人必选' }],
                  })(
                    <Input
                      placeholder="记录人"
                      onChange={this.recorderChange}
                      style={{ width: '200px' }}
                    />
                  )}
                </Form.Item>
              </Col>
              <Col span={6}>
                <Form.Item label="记录日期">
                  {getFieldDecorator('recordDate', {
                    initialValue:
                      this.state.form.recordDate === null
                        ? null
                        : moment(this.state.form.recordDate, 'YYYY-MM-DD'),
                    rules: [{ required: true, message: '记录日期必填' }],
                  })(
                    <DatePicker
                      style={{ width: 200 }}
                      showTime
                      format="YYYY-MM-DD"
                      onChange={this.recordDateChange}
                    />
                  )}
                </Form.Item>
              </Col>
            </Row>

            {/* <Row gutter={16} >
                            <Col span={6}>
                                <Form.Item label="病例资料图片">
                                    <Input placeholder="病例资料图片" style={{ width: "200px" }}  />
                                </Form.Item>
                            </Col>
                        </Row> */}
          </Form>
        </Modal>
      </div>
    );
  }
}
